package com.ruoyi.health.report.service.impl;


import java.util.List;

import com.ruoyi.health.report.domain.HealthMetricConfig;
import com.ruoyi.health.report.mapper.HealthMetricConfigMapper;
import com.ruoyi.health.report.service.IHealthMetricConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 健康指标配置Service业务层处理
 *
 * @author ruoyi
 * @date 2023-10-25
 */
@Service
public class HealthMetricConfigServiceImpl implements IHealthMetricConfigService
{
    @Autowired
    private HealthMetricConfigMapper healthMetricConfigMapper;

    /**
     * 查询健康指标配置
     *
     * @param id 健康指标配置ID
     * @return 健康指标配置
     */
    @Override
    public HealthMetricConfig selectHealthMetricConfigById(Long id)
    {
        return healthMetricConfigMapper.selectHealthMetricConfigById(id);
    }

    /**
     * 查询健康指标配置列表
     *
     * @param healthMetricConfig 健康指标配置
     * @return 健康指标配置
     */
    @Override
    public List<HealthMetricConfig> selectHealthMetricConfigList(HealthMetricConfig healthMetricConfig)
    {
        return healthMetricConfigMapper.selectHealthMetricConfigList(healthMetricConfig);
    }

    /**
     * 新增健康指标配置
     *
     * @param healthMetricConfig 健康指标配置
     * @return 结果
     */
    @Override
    public int insertHealthMetricConfig(HealthMetricConfig healthMetricConfig)
    {
        return healthMetricConfigMapper.insertHealthMetricConfig(healthMetricConfig);
    }

    /**
     * 修改健康指标配置
     *
     * @param healthMetricConfig 健康指标配置
     * @return 结果
     */
    @Override
    public int updateHealthMetricConfig(HealthMetricConfig healthMetricConfig)
    {
        return healthMetricConfigMapper.updateHealthMetricConfig(healthMetricConfig);
    }

    /**
     * 批量删除健康指标配置
     *
     * @param ids 需要删除的健康指标配置ID
     * @return 结果
     */
    @Override
    public int deleteHealthMetricConfigByIds(Long[] ids)
    {
        return healthMetricConfigMapper.deleteHealthMetricConfigByIds(ids);
    }

    /**
     * 删除健康指标配置信息
     *
     * @param id 健康指标配置ID
     * @return 结果
     */
    @Override
    public int deleteHealthMetricConfigById(Long id)
    {
        return healthMetricConfigMapper.deleteHealthMetricConfigById(id);
    }
}
